//
//  MessageViewCell.m
//  guizhou
//
//  Created by 王冲 on 2019/4/22.
//  Copyright © 2019 JK科技有限公司. All rights reserved.
//

#import "MessageViewCell.h"

@implementation MessageViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        [self.contentView addSubview:self.messageBackView];
        [self.messageBackView addSubview:self.bigTittle];
        [self.messageBackView addSubview:self.smallTittle];
        [self.messageBackView addSubview:self.timeLabel];
        [self.messageBackView addSubview:self.detailBtn];
        
        [self.bigTittle makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(20);
            make.left.equalTo(20);
            make.width.equalTo(self.messageBackView.width).offset(-20);
        }];
        
    }
    
    return self;
}

-(UIButton *)detailBtn{
    
    if (!_detailBtn) {
        
        _detailBtn = [[UIButton alloc]initWithFrame:CGRectMake(0, 0, 0, 0)];
    }
    
    return _detailBtn;
}

-(UILabel *)timeLabel{
    
    if (!_timeLabel) {
        
        _timeLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, 0, 0)];
    }
    
    return _timeLabel;
}

-(UILabel *)smallTittle{
    
    if (!_smallTittle) {
        
        _smallTittle = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, 0, 0)];
    }
    return _smallTittle;
}

-(UILabel *)bigTittle{
    
    if (!_bigTittle) {
        
        _bigTittle = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, 0, 0)];
    }
    return _bigTittle;
}

-(UIView *)messageBackView{
    
    if (!_messageBackView) {
        _messageBackView = [[UIView alloc]initWithFrame:CGRectMake(16, 0, JK_SCREEN_WIDTH-32, 30)];
    }
    return _messageBackView;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
